{extend name="common:base"}
{block name="body"}
<div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="{:url('index')}">首页</a>
            <a href="">用户管理</a>
            <a>
              <cite>用户列表</cite></a>
          </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">
                    <!--<button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除
                    </button>-->
                    <button class="layui-btn" onclick="xadmin.open('添加用户','{:url(\'user_add\')}')"><i
                            class="layui-icon"></i>添加
                    </button>
                </div>
                <div class="layui-card-body ">
                    <table class="layui-table layui-form">
                        <colgroup>
                            <col width="10">
                            <col width="40">
                            <col>
                            <col width="10">
                            <col width="80">
                            <col width="80">
                            <col width="80">
                            <col width="80">
                            <col width="200">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>登录名</th>
                            <th>角色</th>
                            <th>登录次数</th>
                            <th>最后登录</th>
                            <th>登录IP</th>
                            <th>加入时间</th>
                            <th>状态</th>
                            <th>操作</th>
                        </thead>
                        <tbody>
                        {volist name="data.data" id="vo"}
                        <tr>
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.username}</td>
                            <td>待开发</td>
                            <td>{$vo.login_num}</td>
                            <td>{$vo.last_login|date='Y-m-d'}</td>
                            <td>{$vo.last_ip}</td>
                            <td>{$vo.create_time|date='Y-m-d'}</td>
                            <td class="td-status">
                                <span class="layui-btn layui-btn-normal layui-btn-mini">已启用</span></td>
                            <td class="td-manage">
                                <!--<a onclick="member_stop(this,'10001')" href="javascript:;" title="启用">
                                    <i class="layui-icon">&#xe601;</i>
                                </a>-->
                                <a title="编辑" onclick="xadmin.open('编辑','{:url(\'user_edit\',[\'id\'=>$vo.id])}')" href="javascript:;" class="layui-btn">
                                    <i class="layui-icon" style="font-size: 22px">&#xe642;</i>
                                </a>
                                <!--<a title="编辑" onclick="xadmin.open('编辑','{:url(\'user_edit\',[\'id\'=>$vo.id])}','','')" href="javascript:;" class="layui-btn">
                                    <i class="layui-icon" style="font-size: 22px">&#xe642;</i>
                                </a>-->
                                <!--<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">
                                    <i class="layui-icon">&#xe640;</i>
                                </a>-->
                            </td>
                        </tr>
                        </tr>
                        {/volist}

                        </tbody>
                    </table>
                </div>
                <div class="layui-card-body ">
                    <div class="page" id="page"></div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="javascript"}
<script>
    layui.use('laypage', function () {
        const laypage = layui.laypage;
        //参考见layui的内置方法
        laypage.render({
            elem: 'page'
            , count: '{$data.total}'
            , limit: '{$data.per_page}'
            , curr: '{$data.current_page}'
            //layui 的标准写法，参考手册
            , jump: function (obj, first) {
                if (!first) {
                    location.href = "?page=" + obj.curr;
                }
            }
        });
    });
</script>
{/block}
